package frontend.visitor;

import frontend.symtable.symbol.Type;
import middleware.llvm.BasicBlock;
import middleware.llvm.value.Value;

import java.util.ArrayList;
import java.util.List;

public class VisitResult {
    public Type expressionType = new Type();//表达式类型
    public Integer constVal;//常量值
    public List<Integer> constantInitValues = new ArrayList<>();//常量初始化值列表
    public List<Type> parameterTypes = new ArrayList<>();//参数类型列表

    public Value irValue;//IR值
    public List<Value> irValues = new ArrayList<>();//IR值列表

    public List<BasicBlock> andBasicBlocks = new ArrayList<>();//与操作基本块
    public List<BasicBlock> nearAndBasicBlocks = new ArrayList<>();//接近与操作基本块
    public List<BasicBlock> trueConditionBlocks = new ArrayList<>();//条件为真时跳转基本块
    public List<BasicBlock> falseConditionBlocks = new ArrayList<>();//条件为假时跳转基本块

    public boolean lvalLoadNotNeed = false;//是否需要加载左值，用于常量传播或死代码消除
}
